
public class SetScore {
    // 局分类
    private int setNumber;    // 局数
    private int homeScore;    // 主队得分
    private int awayScore;    // 客队得分
    private Team winner;      // 胜方队伍

    public SetScore(int setNumber, int homeScore, int awayScore, Team homeTeam, Team awayTeam) {
        this.setNumber = setNumber;
        this.homeScore = homeScore;
        this.awayScore = awayScore;

        // 判断这一局的胜者（简化版：得分高的获胜）
        // 实际应检查是否达到25分且领先2分
        this.winner = (homeScore > awayScore) ? homeTeam : awayTeam;
    }

    // Getters
    public int getSetNumber() { return setNumber; }
    public int getHomeScore() { return homeScore; }
    public int getAwayScore() { return awayScore; }
    public Team getWinner() { return winner; }
}